package entity

import (
	"encoding/json"
	"github.com/gin-gonic/gin"
)

type Type struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

func (Type) TableName() string {
	return "type"
}

// 请求体中获取 UserVideoCollectLoveUpload 对象
func GetType(c *gin.Context) UserVideoCollectLoveUpload {
	data, _ := c.GetRawData()
	var t UserVideoCollectLoveUpload
	_ = json.Unmarshal(data, &t)
	return t
}
